package utils;

import java.io.File;

/**
 * @author Eduardo Rosales
 * Responsible for providing the Clouder Client constant values
 */
public class Constants {
    //Clouder communication and operation constants
    public static final String OK_MESSAGE = "Ok: ";
    public static final String ERROR_MESSAGE = "Error: ";
    public static final String FATAL_ERROR_MESSAGE = "Fatal Error: ";
    public static final String MESSAGE_SEPARATOR_TOKEN = "%%";
    public static final int CLOUDER_SERVER_TIMEOUT= 800; //milliseconds
    //Clouder Client executing modes constants
    public static final int TURN_ON = 1;
    public static final int TURN_OFF = 2;
    public static final int LOGIN = 3;
    public static final int LOGOUT = 4;
    //Clouder Server operation request constants
    public static final int VIRTUAL_MACHINE_OPERATION = 1;
    public static final int PHYSICAL_MACHINE_OPERATION = 2;
    //Clouder Client operation request constants
    public static final int DATABASE_OPERATION = 1;
    public static final int REGISTRATION_OPERATION = 2;
    //ClouderClient database operation request constants
    public static final int TURN_OFF_DB = 0;
    public static final int TURN_ON_DB = 1;
    public static final int LOGIN_DB = 2;
    public static final int LOGOUT_DB = 3;
    //Clouder Server virtual machine operation request constants    
    public static final int VM_TURN_ON = 1;
    public static final int VM_TURN_OFF = 2;
    public static final int VM_RESTART = 3;
    public static final int VM_STATE = 4;
    public static final int VM_TIME = 5;
    //Clouder Server physical machine operation request constants
    public static final int PM_INIT = 1;
    // public static final int PM_TURN_ON = 1;

    public static final int PM_TURN_OFF = 1;
    public static final int PM_RESTART = 2;
    public static final int PM_LOGOUT = 3;
    public static final int PM_MONITOR = 4;
    //Clouder Client server socket communication constants
    public static int POOL_THREAD_SIZE = 5;
    //Clouder Client location constants
    public static final String BIN="bin";
    public static final String SERVER_PARAMETERS="server_parameters";
    public static final String LOCAL_PARAMETERS="local_parameters";
    public static final String KEY="key";
    public static final String PATH_SPACE=" ";
    public static final String DOUBLE_QUOTE = "\"";
    public static String SEPARATOR = File.pathSeparator;
    public static String PATH_SEPARATOR = File.separator;
    public static String JAR_NAME="/ClouderClient.jar";
    //Clouder Client VMware Workstation 6.5 constants
    public static final int VMW=1;
    public static final String VMW_RUN_FILE="\\vmrun.exe";
    public static final String VMW_VMX_EXTENSION=".vmx";
    public static final String VMW_TURN_ON="start";
    public static final String VMW_TURN_OFF="stop";
    public static final String VMW_RESTART="reset";
    public static final String VMW_LIST="list";
    public static final String VMW_VMX_ENCONDING = "windows-1252";
    public static final String VMW_VMX_CPU = "numvcpus";
    public static final String VMW_VMX_MEMORY = "memsize";
    public static final String VMW_VMX_HW = "virtualHW.version";
    public static final String VMW_VMX_HW_VER = "7";
    //Clouder Client operating system operations constants
    public static String WINDOWS_TURN_OFF_COMMAND = "c:\\windows\\system32\\shutdown.exe -s -t 60";
    public static String WINDOWS_RESTART_COMMAND = "c:\\windows\\system32\\shutdown.exe -r -t 30";
    public static String WINDOWS_LOGOUT_COMMAND = "c:\\windows\\system32\\shutdown.exe -l -f";
    public static String LINUX_TURN_OFF_FILE_COMMAND = "turnOffLinux.sh "; 
    public static String LINUX_RESTART_FILE_COMMAND = "restartLinux.sh "; 
    public static String LINUX_LOGOUT_FILE_COMMAND = "logoutLinux.sh "; 
    public static String MAC_PERL_COMMAND = "/usr/bin/perl";
    public static String MAC_TURN_OFF_FILE_COMMAND = "turnOffMac.sh"; 
    public static String MAC_RESTART_FILE_COMMAND = "restartMac.sh";
    public static String MAC_LOGOUT_FILE_COMMAND = "logoutMac.pl";
    //Clouder Client tools constants
    public static String WOL_CMD = "WolCmd";

}//end of Constants
